import request from "@/utils/request";

export default {
  updateCollect(questionId, collectFlag, selectedId) {
    return request({
      url: `/collect/updateCollect/${questionId}/${collectFlag}/${selectedId}`,
      method: "put",
    });
  },
  /**
   * 检查用户有没有收藏过该题
   * @param {question表的主键} questionId
   * @return
   */
  checkCollect(questionId) {
    return request({
      url: `/collect/checkCollect/${questionId}`,
      method: "get",
    });
  },
};
